{% extends 'base.html' %}

{% block content %}
<div class="container">
    <h1>写新文章</h1>
    <form method="post">
        <div class="form-group">
            <label for="title">标题</label>
            <input type="text" class="form-control" id="title" name="title" required>
        </div>
        <div class="form-group">
            <label for="category">分类</label>
            <select class="form-control" id="category" name="category">
                <option value="">无分类</option>
                <option value="tech">技术</option>
                <option value="movie">电影</option>
                <option value="music">音乐</option>
            </select>
        </div>
        <div class="form-group">
            <label for="content">内容</label>
            <textarea class="form-control" id="content" name="content" rows="10" required></textarea>
        </div>
        <button type="submit" class="btn btn-primary">发布</button>
        <a href="{{ url_for('blog') }}" class="btn btn-secondary">取消</a>
    </form>
</div>
{% endblock %} 